package com.haoniu.installment.service.impl;

import java.util.List;
import com.haoniu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haoniu.installment.mapper.TJrRentInstallmentMapper;
import com.haoniu.installment.domain.TJrRentInstallment;
import com.haoniu.installment.service.ITJrRentInstallmentService;

/**
 * 融资申请审核Service业务层处理
 * 
 * @author haoniu
 * @date 2022-07-25
 */
@Service
public class TJrRentInstallmentServiceImpl implements ITJrRentInstallmentService 
{
    @Autowired
    private TJrRentInstallmentMapper tJrRentInstallmentMapper;

    /**
     * 查询融资申请审核
     * 
     * @param id 融资申请审核主键
     * @return 融资申请审核
     */
    @Override
    public TJrRentInstallment selectTJrRentInstallmentById(Long id)
    {
        return tJrRentInstallmentMapper.selectTJrRentInstallmentById(id);
    }

    /**
     * 查询融资申请审核列表
     * 
     * @param tJrRentInstallment 融资申请审核
     * @return 融资申请审核
     */
    @Override
    public List<TJrRentInstallment> selectTJrRentInstallmentList(TJrRentInstallment tJrRentInstallment)
    {
        return tJrRentInstallmentMapper.selectTJrRentInstallmentList(tJrRentInstallment);
    }

    /**
     * 新增融资申请审核
     * 
     * @param tJrRentInstallment 融资申请审核
     * @return 结果
     */
    @Override
    public int insertTJrRentInstallment(TJrRentInstallment tJrRentInstallment)
    {
        tJrRentInstallment.setCreateTime(DateUtils.getNowDate());
        return tJrRentInstallmentMapper.insertTJrRentInstallment(tJrRentInstallment);
    }

    /**
     * 修改融资申请审核
     * 
     * @param tJrRentInstallment 融资申请审核
     * @return 结果
     */
    @Override
    public int updateTJrRentInstallment(TJrRentInstallment tJrRentInstallment)
    {
        tJrRentInstallment.setUpdateTime(DateUtils.getNowDate());
        return tJrRentInstallmentMapper.updateTJrRentInstallment(tJrRentInstallment);
    }

    /**
     * 批量删除融资申请审核
     * 
     * @param ids 需要删除的融资申请审核主键
     * @return 结果
     */
    @Override
    public int deleteTJrRentInstallmentByIds(Long[] ids)
    {
        return tJrRentInstallmentMapper.deleteTJrRentInstallmentByIds(ids);
    }

    /**
     * 删除融资申请审核信息
     * 
     * @param id 融资申请审核主键
     * @return 结果
     */
    @Override
    public int deleteTJrRentInstallmentById(Long id)
    {
        return tJrRentInstallmentMapper.deleteTJrRentInstallmentById(id);
    }
}
